@extends('layouts.app')
@include('crowd.sidebar')
@section('content')
    <div class="content">
        <div class="row custom-invoice">
            <br />
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th>用户名称</th>
                    <th>用户头像</th>
                    <th>支持金额</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data as $item)
                    <tr>
                        <td>{{ $user->get($item->user_id)->nickname }}</td>
                        <td>
                            <img src="{{ $user->get($item->user_id)->avatar }}" width="30" />
                        </td>
                        <td>{{ $item->price/100 }}</td>
                        <td>{{ \App\Modules\Order\Models\SupportOrder::$showStatus[$item->status] }}</td>
                        <td>
                            @if($item->status == \App\Modules\Order\Models\SupportOrder::STATUS_SUCCESS)
                                <a class="btn btn-primary btn-xs delete-confirm"  data-href="{{ route('admin.crowd.support.refund', ['id' => $item->id]) }}"><i class="fa fa-exchange"></i> 退款</a>
                            @endif
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
            {{ $data->links() }}
        </div>
    </div>
@endsection
